<template>
  <div>
    <TypeNav></TypeNav>
    <List></List>
    <Recommend></Recommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for="floor in floorList" :key="floor.id" :floor="floor"></Floor>
    <Brand></Brand>
  </div>
</template>

<script>
import List from "./components/List"
import Recommend from "./components/Recommend"
import Rank from "./components/Rank"
import Like from "./components/Like"
import Floor from "./components/Floor"
import Brand from "./components/Brand"
import { getFloorList } from "@/api"
export default {
  name: "Home",
  data () {
    return {
      floorList: []
    }
  },
  components: {
    List,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand

  },
  mounted () {
    this.reqFloorList()
  },
  methods: {
    async reqFloorList () {
      try {
        const res = await getFloorList()
        this.floorList = res
      } catch (error) {
        alert(error.message)
      }
    }
  }
}
</script>

<style>

</style>